package com.nuoniu.sibanyun.entity.production;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *  加工单-材料明细
 * </p>
 *
 * @author 白强
 * @since 2021-03-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ma_dispatch_list_material_detail")
@ApiModel(value="VProductionWorkInventoryDetail对象", description="")
public class VProductionWorkInventoryDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套ID")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "数据来源")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "加工单ID")
    @TableField("production_work_main_id")
    private Integer productionWorkMainId;

    @ApiModelProperty(value = "加工单_明细ID")
    @TableField("production_work_detail_id")
    private Integer productionWorkDetailId;

    @ApiModelProperty(value = "派工单ID--- 20211225废弃")
    @TableField("production_dispatch_id")
    private Integer productionDispatchId;


    @ApiModelProperty(value = "主产品ID")
    @TableField("parent_inventory_id")
    private Integer parentInventoryId;

    @ApiModelProperty(value = "材料ID")
    @TableField("inventory_id")
    private Integer inventoryId;

    @ApiModelProperty(value = "材料名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "材料编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "材料规格型号")
    @TableField("inventory_specification")
    private String inventorySpecification;

    @ApiModelProperty(value = "条形码")
    @TableField("inventory_bar_code")
    private String inventoryBarCode;

    @ApiModelProperty(value = "预出仓库ID")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "预出仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "批号")
    @TableField("bar_code")
    private String barCode;

    @ApiModelProperty(value = "可用量")
    @TableField("available_quantity")
    private BigDecimal availableQuantity;

    @ApiModelProperty(value = "现存量")
    @TableField("existing_quantity")
    private BigDecimal existingQuantity;

    @ApiModelProperty(value = "单计量id")
    @TableField("unit_id")
    private Integer unitId;

    @ApiModelProperty(value = "计量单位组ID")
    @TableField("unit_group_id")
    private Integer unitGroupId;

    @ApiModelProperty(value = "主计量ID")
    @TableField("base_unit")
    private Integer baseUnit;

    @ApiModelProperty(value = "主计量名称")
    @TableField("base_unit_name")
    private String baseUnitName;

    @ApiModelProperty(value = "辅计量")
    @TableField("sub_unit")
    private Integer subUnit;

    @ApiModelProperty(value = "辅计量名称")
    @TableField("sub_unit_name")
    private String subUnitName;

    @ApiModelProperty(value = "换算率")
    @TableField("unit_exchange_rate")
    private BigDecimal unitExchangeRate;

    @ApiModelProperty(value = "来源bomId")
    @TableField("bom_id")
    private Integer bomId;

    @ApiModelProperty(value = "来源bom版本号")
    @TableField("bom_name")
    private String bomName;
    
    @ApiModelProperty(value = "领料工序ID")
    @TableField("picking_procedure_id")
    private Integer pickingProcedureId;

    @ApiModelProperty(value = "领料工序名称")
    @TableField("picking_procedure_name")
    private String pickingProcedureName;

    @ApiModelProperty(value = "是否倒冲料")
    @TableField("is_backflush_material")
    private Boolean isBackflushMaterial;

    @ApiModelProperty(value = "是否补料")
    @TableField("is_repair")
    private Boolean isRepair;

    @ApiModelProperty(value = "计划数量")
    @TableField("planned_quantity")
    private BigDecimal plannedQuantity;

    @ApiModelProperty(value = "需要数量")
    @TableField("require_quantity")
    private BigDecimal requireQuantity;

    @ApiModelProperty(value = "基础需要数量（单个产品 需要的 数量）")
    @TableField("base_require_quantity")
    private BigDecimal baseRequireQuantity;


    @ApiModelProperty(value = "损耗数量")
    @TableField("loss_quantity")
    private BigDecimal lossQuantity;

    @ApiModelProperty(value = "损耗率（%）")
    @TableField("loss_rate")
    private BigDecimal lossRate;

    @ApiModelProperty(value = "计划数量2")
    @TableField("sub_planned_quantity")
    private BigDecimal subPlannedQuantity;

    @ApiModelProperty(value = "需求数量2")
    @TableField("sub_require_quantity")
    private BigDecimal subRequireQuantity;

    @ApiModelProperty(value = "基础需要数量（辅计量）")
    @TableField("sub_base_require_quantity")
    private BigDecimal subBaseRequireQuantity;

    @ApiModelProperty(value = "损耗数量2")
    @TableField("sub_loss_quantity")
    private BigDecimal subLossQuantity;

    @ApiModelProperty(value = "累计领用数量")
//    @TableField("cum_pick_quantity")
    private BigDecimal cumPickQuantity;

    @ApiModelProperty(value = "累计补料数量")
//    @TableField("cum_repair_quantity")
    private BigDecimal cumRepairQuantity;

    @ApiModelProperty(value = "累计领用数量2")
//    @TableField("sub_cum_pick_quantity")
    private BigDecimal subCumPickQuantity;

    @ApiModelProperty(value = "累计补料数量2")
//    @TableField("sub_cum_repair_quantity")
    private BigDecimal subCumRepairQuantity;

    @ApiModelProperty(value = "累计退货数量")
    @TableField("cum_ret_quantity")
    private BigDecimal cumRetQuantity;

    @ApiModelProperty(value = "累计退货数量2")
    @TableField("sub_cum_ret_quantity")
    private BigDecimal subCumRetQuantity;




    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;


}
